home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
comms
/
other
/
dlg_1_27
/
docs
/
dlgrexx.doc
< prev
Wrap
Text File
|
1999-04-19
|
7KB
|
190 lines
Port commands are a subset of Resource Manager commands. They are used to open,
activate, close, and gain ownership of DLG's communication ports.
Unless indicated otherwise, the commands will return a 0 for no error.
Otherwise, the error code will come from this list:
-2 Port already active
Don't activate the same port twice.
-3 Port not active
Deactivation and locking requires an active port.
-4 Port not locked
You'll see this if you used the wrong password or if you're
going for an "immediate" lock which fails.
-5 ResMan not active
You'll get this if DLG's resource manager, ResMan, is not running.
This probably means you don't have DLG running, either.
-6 Out of Memory
Parameters bracketed in brackets [ like this ] are optional.
NAME
ActivatePort
Activate a port for use.
USAGE
ActivatePort ( Port, [ BGCommand ] )
Port: The name of the port that you want to activate. (string)
BGCommand: A background command that you want to launch upon port
activation. This command should accomplish something useful,
such as monitoring the port for incoming calls. DLG:Setup is
usually used for regular ports; GETTY and TrapDoor are other
popular choices. (optional) (string)
NOTES
NAME
DeactivatePort
Remove a port from the list of active ports. The port must be active already.
USAGE
DeactivatePort ( Port, [ Password ] )
Port: The name of the port that you want to deactivate. (string)
Password: A password to use to lock the port. If the port is not
already locked with a password, you may leave this out and DLG
will supply a password to use while deactivating. If the port
has been previously locked with a password, you must supply
the same password to get the port. (optional) (string)
NOTES
NAME
FreePort
Release the lock on a port. You must have already locked it for this to work.
USAGE
FreePort ( Port, [ Password ] )
Port: The name of the port that you want to release. (string)
Password: A password used to lock the port. If the port was not locked
with a password, you must leave this out. If the port has been
previously locked with a password, you must supply the same
password to get the port. (optional) (string)
NOTES
NAME
ImmedLockPort
Lock the specified port immediately. If an immediate lock cannot be
achieved, it returns immediately with error code -4.
USAGE
ImmedLockPort ( Port, [ Password ], [ Reason ], [ Priority ], [ Break ] )
Port: The name of the port that you want to lock. (string)
Password: The password used to lock the port. If you leave it blank,
DLG will supply an internal password. (optional) (string)
Reason: While this doesn't affect functionality, giving a reason for
the lock is helpful to users online at the time. (string)
(optional)
Priority A value between -127 and 128 inclusive, indicating the
priority of your lock. If two or more processes are trying to
lock the same port, the one with the highest priority will get
the lock. Defaults to 0. (numeric) (optional)
Break An external command that is used to break (interrupt) your
process if another process locks the port with a higher
priority. If the port is one that has a high level of
contention, you should supply this command --otherwise, the
system may lock up waiting for your program to release a port.
NOTES
NAME
LockPort
Lock the specified port, pending the lock until the port is free.
USAGE
LockPort ( Port, [ Password ], [ Reason ], [ Priority ], [ Break ] )
Port: The name of the port that you want to lock. (string)
Password: The password used to lock the port. If you leave it blank,
DLG will supply an internal password. (optional) (string)
Reason: While this doesn't affect functionality, giving a reason for
the lock is helpful to users online at the time. (string)
(optional)
Priority A value between -127 and 128 inclusive, indicating the
priority of your lock. If two or more processes are trying to
lock the same port, the one with the highest priority will get
the lock. Defaults to 0. (numeric) (optional)
Break An external command that is used to break (interrupt) your
process if another process locks the port with a higher
priority. If the port is one that has a high level of
contention, you should supply this command --otherwise, the
system may lock up waiting for your program to release a port.
NOTES
This function will dwell until the port is available for lock. Use this
function only in places where you know that the port will be freed within a
reasonable amount of time. If you are uncertain of this, and if you suspect
that your entire BBS will be locked up because of a pending lock, then use
ImmedLockPort instead -- that's what it's for.
NAME
TransferPortLock
Changes the status of a locked port.
USAGE
TransferPortLock ( Port, [ OldPassword ], [ NewPassword ], [ Reason ],
[ Priority ], [ Break ] )
Port: The name of the port that you want to lock. (string)
OldPassword: The password used to lock the port previously. If you leave
it blank, DLG will supply an internal password. (optional)
(string)
NewPassword: The new password to lock the port with. If you
leave it blank, DLG will supply an internal password.
(optional) (string)
Reason: While this doesn't affect functionality, giving a reason for
the lock is helpful to users online at the time. (string)
(optional)
Priority A value between -127 and 128 inclusive, indicating the
priority of your lock. If two or more processes are trying to
lock the same port, the one with the highest priority will get
the lock. Defaults to 0. (numeric) (optional)
Break An external command that is used to break (interrupt) your
process if another process locks the port with a higher
priority. If the port is one that has a high level of
contention, you should supply this command --otherwise, the
system may lock up waiting for your program to release a port.
NOTES